package com.sync.syncmasterdata.customer.repository.oarep;

import com.sync.syncmasterdata.customer.entity.oa.OACustomerEntity;
import com.sync.syncmasterdata.customer.entity.oa.OACustomerWFEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;
import java.util.Map;

/**
 * 客户档案 dao 持久类
 */
@Repository
public interface UpdateOACustomerRepository extends JpaRepository<OACustomerEntity,Integer> {
    /**
     * 更新客户台账信息
     */
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true, value="update formtable_main_6 set kaihuzh=?2,zhanghao=?3,kaihuh=?4,lianhangh=?5 where id=?1")
    void updateOACus(Integer id,  String kaihuzh,String zhanghao,String kaihuh,String lianhangh);

}
